package com.itcc.service.impl;

import com.itcc.dao.BrowseDao;
import com.itcc.dao.impl.BrowseDaoImpl;
import com.itcc.entity.Browse;
import com.itcc.service.BrowseService;

import java.sql.SQLException;
import java.util.List;

public class BrowseServiceImpl implements BrowseService {
    @Override
    public void saveRecord(String uid, String pid) throws SQLException {
        BrowseDao browseDao =new BrowseDaoImpl();
        browseDao.insertRecord(uid,pid);
    }

    @Override
    public List<Browse> findBrowsesByUid(String uid) throws SQLException {
        BrowseDao browseDao=new BrowseDaoImpl();
        List<Browse> browseList=browseDao.findBrowsesByUid(uid);

        return browseList;
    }

}
